package com.lagou.homework02;

public class Manger {

    private String name;
    private  int id;
    private int salary;
    private int bounus;

    public Manger() {
    }

    public Manger( int id, int salary, int bounus,String name) {

        setName(name);
        setId(id);
        setSalary(salary);
        setBounus(bounus);
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }
    public void setId(int id) {
        if(id > 0){
            this.id = id;
        } else {
            System.out.println("学号不合理");
        }
    }


    public int getSalary() {
        return salary;
    }
    public void setSalary(int salary) {
        if(salary > 0){
            this.salary = salary;
        } else {
            System.out.println("工资不合理");
        }
    }


    public int getBounus() {
        return bounus;
    }
    public void setBounus(int bounus) {
        this.bounus = bounus;
    }

    public void work(){
        System.out.println("正在努力的做着管理工作");
    }
    public void show() {
        System.out.println("工号为" + getId() + "基本工资为" + getSalary() + "奖金为" + getBounus() + "的项目经理" + getName() + "正在努力的做着管理工作");
    }

}
